package com.ruoyi.shopping.service.impl;

import com.ruoyi.shopping.domain.CommodityLikeEvaluate;
import com.ruoyi.shopping.mapper.CommodityLikeEvaluateMapper;
import com.ruoyi.shopping.service.ICommodityLikeEvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评价点赞管理Service业务层处理
 * 
 * @author fxy
 * @date 2024-08-14
 */
@Service
public class CommodityLikeEvaluateServiceImpl implements ICommodityLikeEvaluateService
{
    @Autowired
    private CommodityLikeEvaluateMapper commodityLikeEvaluateMapper;

    /**
     * 查询评价点赞管理
     * 
     * @param id 评价点赞管理主键
     * @return 评价点赞管理
     */
    @Override
    public CommodityLikeEvaluate selectCommodityLikeEvaluateById(Long id)
    {
        return commodityLikeEvaluateMapper.selectCommodityLikeEvaluateById(id);
    }

    /**
     * 查询评价点赞管理列表
     * 
     * @param commodityLikeEvaluate 评价点赞管理
     * @return 评价点赞管理
     */
    @Override
    public List<CommodityLikeEvaluate> selectCommodityLikeEvaluateList(CommodityLikeEvaluate commodityLikeEvaluate)
    {
        return commodityLikeEvaluateMapper.selectCommodityLikeEvaluateList(commodityLikeEvaluate);
    }

    /**
     * 新增评价点赞管理
     * 
     * @param commodityLikeEvaluate 评价点赞管理
     * @return 结果
     */
    @Override
    public int insertCommodityLikeEvaluate(CommodityLikeEvaluate commodityLikeEvaluate)
    {
        return commodityLikeEvaluateMapper.insertCommodityLikeEvaluate(commodityLikeEvaluate);
    }

    @Override
    public int deleteCommodityLikeEvaluate(CommodityLikeEvaluate commodityLikeEvaluate) {
        return commodityLikeEvaluateMapper.deleteCommodityLikeEvaluate(commodityLikeEvaluate);
    }

    @Override
    public boolean queryByCCId(CommodityLikeEvaluate commodityLikeEvaluate) {
        Boolean result = commodityLikeEvaluateMapper.queryByCCId(commodityLikeEvaluate);
        if(result == null){
            return false;
        }
        return result;
    }

    /**
     * 修改评价点赞管理
     * 
     * @param commodityLikeEvaluate 评价点赞管理
     * @return 结果
     */
    @Override
    public int updateCommodityLikeEvaluate(CommodityLikeEvaluate commodityLikeEvaluate)
    {
        return commodityLikeEvaluateMapper.updateCommodityLikeEvaluate(commodityLikeEvaluate);
    }

    /**
     * 批量删除评价点赞管理
     * 
     * @param ids 需要删除的评价点赞管理主键
     * @return 结果
     */
    @Override
    public int deleteCommodityLikeEvaluateByIds(Long[] ids)
    {
        return commodityLikeEvaluateMapper.deleteCommodityLikeEvaluateByIds(ids);
    }

    /**
     * 删除评价点赞管理信息
     * 
     * @param id 评价点赞管理主键
     * @return 结果
     */
    @Override
    public int deleteCommodityLikeEvaluateById(Long id)
    {
        return commodityLikeEvaluateMapper.deleteCommodityLikeEvaluateById(id);
    }
}
